A multipurpose laboratory diffractometer for operando powder X-ray diffraction investigations of energy materials

This paper describes the design and implementation of an in-house laboratory powder X-ray diffractometer tailored for structural investigations of energy materials. The performance characteristics of the diffractometer together with some example research applications are presented.


Introduction
Powder X-ray diffraction (PXRD) is a well established and versatile method for the structural characterization of materials that is applied routinely in research laboratories as well as in large-scale synchrotron and neutron facilities. Modern synchrotron radiation sources offer extremely brilliant X-ray radiation over an extended and continuous photon-energy range. Combined with modern detector technologies, these facilities are ideal for time-dependent operando experiments (Herklotz et al., 2013). In the field of laboratory X-ray diffraction, there have also been a number of new instrumental developments in recent years. Nowadays, there are reliable and high-performance X-ray sources such as microfocus rotating anodes, sources with diamond-embedded target materials (Yun et al., 2016) and liquid-metal jet anodes available (Hemberg et al., 2003), with optimized multilayer X-ray optics delivering two-dimensionally focused or parallel collimated beams with spot sizes in the low millimetre range or below and energies between $8 keV (Cu K) and $25 keV (Ag K). The harder X-ray energies of Mo K and Ag K radiation provide sufficiently high penetration power for more complex measurement setups such as in situ chemical reactors and electrochemical cells. The use of Mo and Ag tubes also allows the collection of total scattering data for the analysis and interpretation of the pair distribution function in the laboratory (Irving et al., 2021;Thomae et al., 2019). The drastically reduced incident photon flux of in-house laboratory X-ray sources compared with synchrotron sources necessitates the use of efficient detector systems with high quantum efficiency close to the absorption efficiency of the detector materials, to reduce the data-collection time so that dynamic processes can be monitored with sufficient time resolution and good counting statistics. With these experimental techniques, the gap between synchrotron diffraction, with its high flux and high resolution in both angle and time, and the common stationary diffraction measurements using conventional diffractometers can be closed. Such experiments are particularly useful when experimental data need to be collected over extended time scales, such as during chemical reactions with changes slower than several seconds or during operando degradation studies of functional materials.
X-ray diffraction has proven to be an essential tool in battery research, where electrochemical insertion or conversion reactions need to be studied under operating conditions (Liu et al., 2019). As a non-destructive characterization technique, it can be used to investigate crystallographic changes of the electrochemical active materials and phase transitions as a function of state of charge or chemical composition. Additionally, diffraction techniques yield valuable information about microstructural changes during prolonged battery cycling, which are crucial for the understanding of degradation processes. Aside from these electrochemical operando experiments, the understanding and optimization of time-and cost-intensive synthesis processes of advanced battery materials attract the focus of academic and industrial research. Non-ambient in situ diffraction is the method of choice and gives important insights on the reaction pathways and kinetics of phase transformations during synthesis (Wang et al., 2021;Bianchini et al., 2020).
Here, we describe the design and implementation of an inhouse laboratory powder X-ray diffractometer tailored for structural investigations of battery and functional materials, and we report on typical research applications. The diffractometer is operated at the Institute for Applied Materials of the Karlsruhe Institute of Technology. It is suitable for timeresolved operando studies under non-ambient conditions with time scales from 30 s up to a few minutes and medium angular resolution, as well as for slower crystallographic characterizations where higher angular instrumental resolution is necessary.

Overview
The whole multipurpose diffractometer is mounted on a granite measuring plate (manufactured by Oelze, Germany) and is based on a molybdenum microfocus rotating anode with 2D multilayer beam optics providing parallel collimated Mo K 1,2 X-rays. The choice of a molybdenum rotating-anode X-ray tube with a wavelength of = 0.7093 Å and an energy of about 17.48 keV, instead of the more conventional Cu K X-ray tube source, reduces the flux of the incident beam by approximately half (Honkimä ki et al., 1990). The shorter Mo K wavelength is beneficial for the optimization of the R value of the sample ( is the linear absorption coefficient, R is the sample thickness) to be closer to the ideal value of $1. Additionally, the diffraction data are less affected by fluorescence effects because the Mo K energy is rather far away from the energies of the K absorption edges of the transition metal (TM) elements, such as Fe, Co, Ni, Mn, contained in most battery materials. The fluorescence background can be further reduced by a single-photon-counting PILATUS detector through an energy discrimination threshold setting above the highest fluorescence emission line of the TM contained in the sample under investigation.
On demand, the incident-beam path can be complemented by a two-bounce Ge(111) monochromator to reduce the beam energy to pure Mo K 1 radiation. The monochromator is motorized and can be moved into or out of the primary beam when needed. A large part of the primary-beam path to the sample position is evacuated to reduce attenuation due to air scattering. A large Eulerian cradle with a motorized XYZ translation stage is the central part of the diffractometer. This can accommodate large samples or experiments and offers rotational and translational degrees of freedom for positioning. The diffracted X-rays are detected with a large PILATUS 300K-W area detector mounted on the 2 arm of the goniometer. The sensor material is silicon with a thickness of 320 mm. The detector can be used as a static detector or in a scanning-type mode of operation when a larger 2 range needs to be covered. An overview of the diffractometer within its walk-in radiation-shielding enclosure is shown in the photograph in Fig. 1  A photograph of the multipurpose in-house diffractometer with labelled individual components: (1) microfocus rotating Mo anode (Rigaku MM-007 HF), (2) Osmic VariMax multilayer optics, (3) Ge(111) crystal channel-cut monochromator, (4) motorized slit systems (JJ X-Ray, Denmark) with an evacuated flight tube, (5) video microscope camera, (6) six-circle goniometer/Eulerian cradle with XYZ sample stage (Huber, Germany) and (7) PILATUS 300K-W area detector (Dectris, Switzerland).

X-ray source and primary-beam optics
The Rigaku MM-007 HF Mo microfocus anode is run at 50 kV and 24 mA. The emitted X-rays are collimated through Osmic VariMax multilayer optics, resulting in a 2D collimated parallel beam (divergence less than 0.5 mrad) with a photon flux of $10 8 photons per second at 1.2 kW (according to the manufacturer). The X-ray source and the beam delivery system are mounted on a XZ translation stage, which can move horizontally by 100 mm and vertically by 40 mm so that the incident beam can be aligned to the goniometer centre. The beam size can be adjusted as required via two motorized slit systems (JJ X-Ray) (each has four independently movable polished tungsten carbide blades). Fig. 2(a) shows a PILATUS image of the collimated primary beam (a Cu metal absorber was used to reduce the incident intensity). The detector was positioned 50 cm behind the goniometer centre perpendicular to the incoming beam, i.e. the total distance from the exit window of the multilayer mirror to the detector was $180 cm. The cross section of the beam is diamond shaped, which is a result of the double reflections from the multilayer mirrors. The intensity distribution of the unseparated K 1,2 doublet is approximately Gaussian shaped with a spatial extension of $2 mm in each direction. The K line is completely suppressed from the emitted X-ray spectrum by the multilayer optics. For measurements of flat samples in transmission geometry (Debye-Scherrer geometry, Fig. 3) where higher angular instrumental resolution is needed, i.e. reduced footprints of the diffracted beams on the detector, the beam size can be modified by the motorized slit system. A typical beam profile with reduced slit openings is presented in Fig. 2(b). The introduction of the Ge(111) channel-cut monochromator in the beam path offers higher spectral purity with the suppression of the K 2 line but leads to a substantial reduction of the photon flux at the sample. An image of the profile of the pure monochromatic K 1 beam is shown in Fig. 2(c). The beam size after the Ge(111) crystal monochromator decreases compared with the K 1,2 beam and the beam is vertically shifted. This beam shift can be compensated by a Z translation of the X-ray source and optical system. The alignment of the monochromator crystal is facilitated by a custom-made piezo stage.

Goniometer, detector and data reduction
A Huber 5021 six-circle goniometer combined with a full Eulerian cradle fitted with a motorized XYZ translation stage is used for sample and detector placement. Sample positioning is facilitated by a video microscope camera attached to the Eulerian cradle. A PILATUS 300K-W detector is mounted to the 2 arm of the goniometer by an aluminium frame so that the direct beam is centred on the detector area. The Pilatus 300K-W detector is elongated and has a sensitive area of Images of the direct beam after the collimating 2D multilayer X-ray optics and $180 cm beam path. (a) Cross section of the full beam, (b) the beam with narrower slit settings, and (c) the beam after the multilayer mirror and Ge(111) channel-cut monochromator. The FWHMs in the X and Z directions are estimated with 1D Gaussian fits to the intensity data (the dashed black line is the Gaussian fit and the red line is a plot of the intensity value at that pixel).

Figure 3
(a) A schematic drawing of the diffraction setup in transmission geometry with the 2D detector and the laboratory reference coordinate system. (b) A representation of the geometry, where D 0 is the distance between sample and detector along the normal of the detector surface and 2 is the 2 position of the detector arm. 253.7 Â 33.5 mm (1475 Â 195 pixels) with a pixel size of 172 Â 172 mm. The mounting frame allows the detector to be mounted vertically or horizontally. The detector is motorized on its arm and the distance from the sample to the detector can be varied between 250 and 1000 mm. Therefore, the 2 range covered by a single detector exposure and the angular resolution in terms of diffraction line widths depend on the pixel size of the detector, the tilt angle of the detector, the sample-to-detector distance, and the sample or beam size. Diffractometer and detector control is based on the spec software package (https://www.certif.com/content/spec/). The images can be saved using different formats, such as .tif or .cbf, and are further processed with customized Python scripts. The Python library for fast azimuthal integration pyFAI (Kieffer et al., 2019) is utilized for the calibration of the diffraction setup and for the transformation of the 2D diffraction images into 1D powder diffraction patterns. With the aid of the pyFAI library, multiple diffraction images taken at various positions can be integrated together to generate a powder diffraction pattern that covers a high 2 range (Kieffer et al., 2020).

Diffraction geometry and instrumental profile function
The use of large area detectors for X-ray powder diffraction experiments is common at modern synchrotron beamlines, whereas laboratory powder diffractometers are often still equipped with smaller 1D line or 2D area detectors mounted on movable detector arms. Large area detectors simultaneously capture intensity at different angles. When a range of angles needs to be covered, this parallel detection at different angles dramatically speeds up the measurement process compared with a sequential measurement by a point detector. For a given time of measurement, more counts are detected on the large area detector and therefore the signal-to-noise ratio of the diffractogram also increases. This offers the possibility for fast data acquisition, which is ideal for obtaining real-time structural information. Although speed can be high, with this technique the angular resolution is lower compared with setups with multichannel high-resolution detectors with analyser crystals. An overview of powder diffraction using area detectors is given by Norby (1997), who derives and discusses some geometric factors which are important when Rietveld refinement of powder diffraction data obtained from flat area detectors is performed. Fig. 3 contains a schematic drawing of the diffraction geometry of the parallel-beam diffractometer. The angular range is given by the length of the detector d pil and its distance to the sample D 0 . As can be seen from Fig. 1, the detector is attached to the 2 arm at an angle of 90 , and therefore the 2 position of the arm, 2, has to be chosen to lie exactly in the middle of the detection range between 2 min and 2 max . The angular range that is covered in 2 is then 2 arctanðd pil =2D 0 Þ, and increasing the detector distance increases the angular resolution at the expense of angular coverage (2 range) and number of detected photons per time interval. In this diffractometer, the accessible angular range of the detector can be enlarged, either by moving the detector closer to the sample or by changing its 2 angle during the diffraction experiment and acquiring several diffraction images. These images can then be merged and integrated to 1D powder diffraction data, covering an extended 2 range. Although this scanning movement of the detector increases the counting time for an experiment, compared with a stationary detector it can provide increased angular resolution (owing to the larger sample-detector distance D 0 ) at the same angular coverage.
Apart from the detector distance, the instrumental line broadening Á2 (FWHM) is also determined by other geometrical parameters, including the X-ray beam size or the sample dimensions, the pixel size with the point-spread function of the detector, and the absorption thickness of the sensitive detection layer (Chernyshov et al., 2021). In addition, the beam divergence and the wavelength dispersion of the Mo K emission line influence the peak widths of the reflections and therefore limit the angular resolution (Mendenhall et al., 2019). In this diffractometer, with parallel-beam optics, the main contribution to the peak width stems from the size of the projection d projected of the sample height d sample onto the detector. The image of the sample on the detector covers several pixels and therefore comprises the angular resolution. Only the illuminated area is projected, and therefore d sample is either the size of the X-ray beam or the size of the illuminated region of the sample, for the case that the X-ray beam is larger than the sample (e.g. a small horizontally aligned capillary in Fig. 3). For the geometry depicted in Fig. 3, the resolution can be approximated under the assumption d sample ( D 0 according to From similar geometrical considerations, expressions for the other experimental parameters influencing the reflection peak widths can be derived. With the assumption of a Gaussian convolution of the individual contributions (Dippel et al., 2015), an instrumental resolution function based on the aforementioned experimental parameters can be calculated according to where Á2 hkl is the total FWHM of an hkl reflection, and Á2 height , Á2 width , Á2 pix , Á2 thick , and Á are the contributions to the broadening from the sample height, width, pixel size, thickness of the absorbing detector layer, beam divergence and wavelength dispersion, respectively. The convolution, together with the individual contributions, is shown in Fig. 4 for a representative sample-to-detector distance of 0.7 m. This description of the variation of the peak widths with the diffraction angle is based on the physical parameters of the research papers area-detector diffraction setup, in contrast to the parametrization according to the Caglioti (Caglioti et al., 1958) equation where the fitted parameters often have no physical meaning. Because of the ease of implementation in Rietveld refinement software packages, the Caglioti formula is still popular and will also be used later in this work. In principle, in a 2D diffraction setup the cross-sectional shape of the X-ray beam should be small and round (He, 2009). A large beam cross-section profile gives a high X-ray flux, which is advantageous for fast data collection and better sampling statistics, while a small cross section leads to a better angular resolution because the smaller footprint of the X-ray beam on the sample results in a small projection on the detector and less broadening of the Debye-Scherrer rings. However, a small cross section has the disadvantage of a smaller illuminated sample area and possible problems with counting statistics, in particular for large-grained and/or textured samples. In practice, the cross section of the incident beam is chosen to optimize the angular resolution achieved on the PILATUS 300K-W detector. This detector has a stripshaped detection area of 253.7 by 33.5 mm. Along the short edge of the strip (X direction), the full beam width is used to maximize intensity (see Figs. 1 and 2), whereas along the long edge of the detector (Z direction), the height of the beam is reduced to reduce the width of the Debye-Scherrer rings on the detector. A typical beam profile used for powder diffraction experiments is shown in Fig. 2(b). With this rectangular beam or, to be more precise, truncated elliptical beam cross section, the recorded powder diffraction images exhibit no significant geometrical broadening effects and the complete area of the detector, i.e. the 33.5 mm wide segments of the Debye-Scherrer rings, can be employed for azimuthal data integration. Similar effects of an illuminated sample with rectangular shape are discussed by Norby (1997).
The instrumental profile function (IPF) provides a description of the performance of a powder X-ray diffractometer and is a convolution of the different influences of the optical components of the instrument which contribute to the instrumental line profile. These instrumental profile components include the geometry of the diffractometer, as well as optical features like the emission profile of the X-ray tube. The IPF is important when microstructural effects such as structural defects and domain size effects are determined from the observed line profiles and is a prerequisite for such an analysis (Scardi, 2020). The setup of the diffractometer can be adjusted to match the experimental requirements. When a high time resolution for operando studies is needed, a larger beam is utilized with a smaller goniometer radius (sample-to-detector distance). For a high-resolution setup, narrow slit openings, a large goniometer radius and the Ge(111) crystal monochromator can be employed. This setup reduces the incident intensity considerably (by a factor of $30) but offers symmetrical and sharp diffraction profiles suitable for detailed crystallographic studies such as line-broadening analysis. The fully motorized diffractometer allows for an automated transition between the two modes during operando experiments.
The IPF, as a function of the sample-to-detector distance with and without the Ge(111) monochromator, was determined from a measurement of the diffraction pattern of the NIST SRM660b LaB 6 line-profile material loaded in a 0.5 mm diameter borosilicate glass capillary and the full beam sizes [see Figs. 2(a) and 2(c)]. Data were collected with exposures of the PILATUS detector set at different 2 positions. A cosmic spike filter (Takeuchi et al., 1993) implemented in Python was applied for two consecutive exposures at each detector position to remove noise, after which the images were integrated to 1D powder diffraction patterns. The total exposure time was 5.8 and 0.7 h, with and without the Ge(111) monochromator, respectively. The diffraction line profiles were described with pseudo-Voigt functions, and a standard parameterization of the IPF as described by Rebuffi et al. (2014) was used. Within this parameterization, the Caglioti equation for the dependence of the FWHM on the diffraction angle and a parabolic equation for the Lorentzian profile fraction (pseudo-Voigt mixing parameter) are applied: and Here, u, v, w and a, b, c are fit parameters. Instrumental resolution for the area-detector diffraction setup with a sample-to-detector distance of 0.7 m, sample dimensions of 0.35 mm and an active detector thickness of 100 mm. The convolution according to equation (2), together with the individual contributions, are plotted for detector angles 2 = 12, 22, 32 and 42 . A divergence of 0.3 mrad was assumed for the primary X-ray beam. The wavelength dispersion is given by Á = 2À tan()/E 0 (180/) (2), where À and E 0 are the lifetime broadening and the peak emission energy in eV (Cheary et al., 2004), respectively. of the figure demonstrate the details of the profile fits in the low-and high-angle 2 ranges, together with the corresponding IPFs derived from the fitting. In both cases, peak positions, intensities, widths, Lorentzian fractions and a polynomial background (Chebyshev polynomial) were refined. The observed FWHMs are $0.04 and $0.05 for the configurations with and without the monochromator, respectively, and increase only slightly in the 2 range between 9 and 50 . The Lorentzian fraction varies between $0.2 and $0.5 for the Mo K 1,2 radiation. The IPF changes to an almost Gaussian shape when the Ge(111) monochromator is inserted in the primary-beam path. Using smaller capillary diameters such as 0.3 mm will further reduce the instrumental FWHMs and therefore increase the angular resolution. This effect is more prominent for shorter sample-to-detector distances. At larger distances, D 0 , the contributions of pixel size, beam divergence and wavelength dispersion on the instrumental broadening become significant and limit the attainable angular resolution.
The effect of the sample-to-detector distance on the instrumental line width is depicted in Fig. 6. The sample-todetector distance was varied between 40 and 90 cm. In accordance with equation (1), the profile widths decrease with increasing sample-to-detector distance. The instrumental FWHMs vary between $0.02 and $0.06 , whereas the monochromatic Mo K 1 diffraction setup provides slightly sharper profiles. At greater distances, the reduction of the FWHMs decreases because of the growing contributions of the pixel size (172 Â 172 mm) of the PILATUS detector, the beam divergence and the wavelength dispersion to the IPF.

Operando PXRD of NCM cathode active material
Mixed layered lithium TM oxides of the general formula LiNi 1ÀyÀz Co y Mn z O 2 (NCM) are widely used as cathode active materials (CAMs) for rechargeable lithium ion batteries. A medium nickel content NCM with composition LiNi 0.5 Co 0.2 -Mn 0.3 O 2 (NCM523) was chosen as a cathode material to demonstrate the quality of the X-ray scattering data collected from a pouch-cell-type electrochemical cell with the multipurpose diffractometer in transmission geometry. The primary X-ray beam size was reduced with the motorized slit system so that a beam profile as depicted in Fig. 2(b) was obtained. The pouch cell used had no special X-ray transparent windows and therefore measurements under realistic cycling conditions were possible with this setup. The electrode had a capacity loading of $2 mAh cm À2 and consists of 93 wt% active material. As a counter electrode, metallic lithium was used. Pouch cells were assembled inside a dry room. The cathode sheets (20 Â 40 mm) were stacked with Celgard 2500 polypropylene separator and lithium anode foil using 250 ml of LP47 electrolyte. Details of the cell preparation and electrochemical cycling conditions have been reported by Kondrakov and co-workers (Kondrakov, Schmidt et al., 2017;Kondrakov, Geßwein et al., 2017) and de Biasi et al. (2017). For the operando PXRD experiment, the NCM523 pouch cell was cycled twice with a C/10 rate. During charge and discharge, the active material is delithiated and lithiated according to LiNi 0.5 Co 0.2 Mn 0.3 O 2 $ Li 1Àx Ni 0.5 Co 0.2 Mn 0.3 O 2 + xLi. Diffraction images were taken every 150 s. This corresponds to a change in the lithium concentration of Áx(Li) ' 0.003. During the charge and discharge of the cell, $1130 diffraction images were acquired. The integrated diffraction patterns were analysed with the Rietveld method using the TOPAS v6 software (Coelho, 2018). The instrumental resolution function was determined from an annealed CeO 2 sample pressed in between two polyimide foils. This calibration sample was mounted on the same sample holder as used for the operando measurement of the pouch cell. Lattice parameters and the oxygen atomic z O coordinate of the NCM phase were refined. The background was modelled using a Chebyshev polynomial function. To account for possible sample displacement errors of both the cathode material and the aluminium current collector, a zero-point correction given by Norby (1997) was used. A phenomenological anisotropic peak-broadening model by Stephens (1999) was used for the observed peak broadening of the NCM cathode material. Fig. 7 shows a contour plot of the collected diffraction patterns of the NCM523/Li cell cycled at C/10 between 3.0 and 4.3 V, together with the corresponding voltage profile. This figure demonstrates the evolution of the Bragg reflections of NCM523 during lithium deintercalation (charge) and reintercalation (discharge). In addition to the reflections of the cathode material, strong reflections of the aluminium current collector and the aluminium of the composite pouch foil, which do not shift during the experiment, are visible. The peaks of the NCM cathode shift continuously and reversibly during the charge/discharge cycles, indicating that the layered R " 3 3m structure is retained throughout the investigated concentration range of lithium. At the beginning of the charge process, the 003, 107 and 018 reflections shift to lower 2 angles until a voltage of $4.0 V is reached. Then, these reflections shift to higher angles as the peak shifts are reversed during the discharge cycle. The 110 and 113 peaks, on the other hand, move to higher angles during the charge cycle and to lower angles during discharge. These anisotropic distortions of the NCM structure during battery operation are reflected in the chances of the hexagonal lattice parameters. The evolution of the lattice parameters derived from Rietveld refinements is plotted in Fig. 8 (5) Å . This decrease, together with the decrease of the a lattice parameter during lithium extraction, demonstrates that the charge is compensated by oxidation of the TMs. The c lattice parameter relates to the interslab distance of the lithium layers. The increase of both values is usually ascribed to the increasing Coulomb interslab repulsion when lithium is removed. At high degrees of delithiation a dip in the c lattice parameter evolution is observed, which is due to a decrease of the interslab repulsion. This effect is much more pronounced in Ni-rich NCMs. The origin of this effect for NCM811 was already reported in an earlier study (Kondrakov, Geßwein et al., 2017).

Gas-flow reactor for in situ diffraction
The high-temperature calcination of NCM materials is a highly relevant industrial process, which plays a major role in determining their characteristics as CAMs. Thus, it is crucial to understand the interplay of thermodynamics and kinetics to engineer the materials' crystallinity and primary particle size. Two recent studies of the formation of LiNiO 2 (Bianchini et al., 2020) and LiNi 0.6 Co 0.2 Mn 0.2 O 2 (Wang et al., 2021) showed that the reaction proceeds from a layered TM hydroxide through a 3D condensed intermediate phase to the final layered structure. Additionally, there is a strong correlation between easily observed lattice parameters and crystallite size, as well as chemical processes such as Ni 2+ to Ni 3+ oxidation or site ordering inside the unit cell. Thus, performing in situ PXRD kinetic studies with a fast area detector on differently prepared and/or doped precursors allows the effect of the reactant modifications on the calcination and thus the final product to be distinguished in the laboratory.
For these studies, we developed a gas-flow reactor for in situ diffraction, modifying an original design by Chupas et al. (2008), as displayed in Fig. 9(a). The setup was designed for experimental flexibility, high reproducibility and chemical resistance versus reactive lithium species. The homogeneity of the heating-zone temperature was achieved by using a high number of heater wire windings (60 windings over 32 mm). Additionally, the heater rod was mechanically fixed. This fixation suppresses heater motion as a result of thermal expansion of the heating wire, which leads to large standard deviations in T max in setups with loosely attached heaters. The power controller enabled T max = 1148 K with a ramp of up to 20 K min À1 . Temperature was controlled via an in-line thermocouple [K type by Omega, outer diameter (OD) up to 0.8 mm], which is the bottleneck for further increases in T max . The temperature difference between the X-ray focal point and the tip of the thermocouple was calibrated by refining the unitcell volume of Al 2 O 3 (Stinton & Evans, 2007) and ranged up to 77 K. The use of mass-flow controllers (Bronkhorst model) ensured reproducible oxygen gas flows of 13.8 and 690 atmospheric exchanges per hour within AE2% deviations for 1.0 mm inner diameter (ID) capillaries.
The reactive zone and loading scheme were designed to increase the chemical resistivity of the setup versus lithium compounds while reducing reactant losses due to side reactions. A sapphire capillary (OD 1.5 mm, ID 1 mm, Saint-Gobain Crystals) served as a reactor, which was aligned so that no major reflection of Al 2 O 3 was detectable. The low-surfacearea wall material slowly reacts with Li 2 O sources such as LiOH to form a translucent white film (probably LiAlO 2 ). In contrast to quartz capillaries, where molten LiOH (m.p. 735 K at 1 atm) (1 atm = 101 325 Pa) reacts with SiO 2 to yield side products such as Li 2 SiO 3 or Li 4 SiO 4 , (Bianchini et al., 2020;Wang et al., 2021), no additional peaks were observed in the PXRD measured in sapphire capillaries. Alkaline earth silicate wool was used as a plug material instead of quartz. The reactant mixture extended over a 15 mm long zone and was rocked along the X direction over 1 mm in order to increase sample averaging at the X-ray focal point (FWHM 1.75 mm along capillary direction).
Currently, the setup can be used to either track the crystallographic parameters under synthetic conditions or for kinetic studies. Tracking the reaction during calcination involves a slow heat up at 3 K min À1 and a long hold time of several hours. Fig. 9(b) shows the contour plot of the PXRD patterns measured during the calcination of a reactant mixture of 1.01 equivalents LiOHÁH 2 O and 1 equivalent Ni(OH) 2 , which was partially dehydrated at 623 K for 12 h for higher loadings and good reactant mixing. With a temperature ramp of 1.15 K min À1 and diffraction images taken every 600 s, the  patterns were averaged over a window of $11 K during heating. With a dwell time of 6 h, the total measurement time was 19 h. The 101 diffraction patterns were analysed by sequential Rietveld refinement using the software TOPAS Academic v6. Next to the refinement of the lattice parameters, crystallite size and strain, the 2 range of 5.6-47.8 allows meaningful refinements of z O and the occupational defect of Ni on the Li site. The B iso parameters were constrained to one parameter for all sites and the background was modelled via a Chebyshev polynomial function. Sample absorption was modelled by the method of Sabine et al. (1998) for LiNiO 2 , which dominates the contribution of the capillary wall material (R sapphire ' 0.24 versus R LiNiO 2 ' 1.12).
This experiment allows meaningful conclusions to be drawn about chemical processes at high temperatures. Here, the synthesis of layered LiNiO 2 from preannealed LiOH and the condensed cubic (Ni,Li)O 1À rock-salt-type intermediate serves as an example. In the rock-salt material, Ni 2+ and Li + share the same site in the unit cell, and the Li + content increases with temperature, hitting a miscibility gap at around 0.3 Li + (Bianchini et al., 2018). Once the temperature is high enough, Ni is oxidized from the di-to the trivalent state. This process accelerates further Li incorporation, as well as ordering of Ni and Li into separate sites and layers. In parallel, the lattice parameter a decreases despite increasing temperature, due to the smaller radius of the Ni 3+ ion. Once the oxidation is finished, these values equilibrate. Consecutively, the crystallites grow, but a very subtle increase in the lattice parameter a can also be observed. This is interpreted as the evaporation of lithium species during the annealing stage, which leads to degraded Li 1Àz Ni 1+z O 2 . These processes are highly sensitive to the presence of dopants. The in situ gas-flow reactor allows observation of these processes, identification of optima between crystal growth and degradation in kinetically stable phases, and studies on the influence of dopants on hightemperature crystallization. (a) A schematic drawing and a photograph of the gas-flow reactor for in situ diffraction, with an example contour plot of the PXRD patterns collected during the calcination of a reactant mixture of LiOHÁH 2 O and Ni(OH) 2 , including hkl indices of the LiNiO 2 product phase. Evolution of (b) lattice parameters (a and c), the z O coordinate of oxygen and the defect occupancy of Ni Li during heating as well as (c) crystallite domain sizes during isothermal annealing experiments based on Rietveld refinements and results from a kinetic fitting analysis (Ostwald ripening model).
For kinetic studies using isotherms, fractions of the preannealed reactant mixture were heated to different maximum temperatures with a ramp of 20 K min À1 . To increase time resolution, the exposure time and the 2 range were reduced to 300 s and 6.1-34.3 , respectively, to capture the evolution of the lattice parameters as well as crystallite size evolution over time. The resulting data allow the extraction of kinetic parameters, as displayed in Fig. 9(c). An Ostwald ripening model was fitted to the data in order to extract rate constants and exponents for subsequent analysis. Overall, the in situ gas-flow furnace allows the detection of a variety of synthesis and crystal growth parameters, which either require challengingto-obtain synchrotron time or a large number of black-box solid-state experiments, or are not accessible at all. It is thus a valuable tool for solid-state chemists and material scientists.

Microstructural characterization of LNMO cathode active material
This example is part of research activities on the development and optimization of nickel-substituted co-doped highvoltage spinel cathode LiNi 0.5 Mn 1.5 O 4 (LNMO) material for high-power Li-ion battery applications (Hö weling et al., 2017). LNMO offers attractive electrochemical properties, such as a high rate capability and a high operating voltage of $4.7 V against Li + /Li due to the active redox couple Ni 2+ /Ni 4+ with a theoretical capacity of 147 mAh g À1 . The synthesis conditions and the subsequent powder processing steps, especially the calcination treatment, play a crucial role in the electrochemical performance of the produced electrodes. Therefore, an understanding of the interaction of processing conditions and crystallographic microstructural properties, as well as electrochemical properties, is of significant importance (Stü ble et al., 2022).
The investigated CAM is an iron titanium co-doped spinel with composition LiNi 0.5 Mn 1.37 Fe 0.1 Ti 0.03 O 3.95 (LNMFTO). Details of the synthesis process can be obtained from Hö weling et al. (2017). Data were collected on 0.5 mm glass capillaries with the diffractometer in high-resolution setup, that is the Ge(111) monochromator was included in the beam path and a large sample-to-detector distance of 90 cm was used. This configuration of the diffractometer yields instrumental FWHMs between 0.02 and 0.03 in 2, as can be seen from Fig. 6(a) where the IPF is plotted for different sample-todetector distances. Diffraction data were collected at detector angles between 15 and 45 2, with 5 steps and an exposure time of 300 s at each detector position. This stepwise data collection was repeated 20 or 30 times, which resulted in a total data-collection time of $11 or $17 h for each material. Fig. 10(a) shows scanning electron microscopy (SEM) images of the as-synthesized LNMFTO material after a 24 h ballmilling step in a planetary ball-mill and a spray-calcination process, and after an additional calcination step at 1053 K for 2 h [ Fig. 10(b)]. The spray-drying process yields spherical granules with diameters ranging between 5 and 20 mm. The granules consist of small agglomerated primary particles. Before the additional calcination at 1053 K, the particles are, as a result of the previous ball-milling process, irregularly shaped with a size distribution up to around 50 nm. Calcination leads to grain growth and the formation of an octahedral morphology of the spinel crystallites. The powder data were analysed by the Rietveld method with a whole powder pattern modelling (WPPM) approach implemented in TOPAS as macros (Scardi, 2008;Scardi et al., 2018). The size contribution to the peak broadening was accounted for by assuming spherical domains for the ball-milled sample and octahedral domains for the calcined sample, with a lognormal distribution g(D) of diameters or octahedron edges D, gðDÞ ¼ ½1= Dð2Þ 1=2 expfÀð1=2Þ½ðln D À Þ= 2 g. From the lognormal mean and variance 2 , which are refinable parameters, the arithmetic mean hDi and the standard deviation (sd) of the lognormal distribution can be calculated as hDi ¼ expð þ 2 =2Þ and sd ¼ fexpð2 þ 2 Þ½expð 2 ÞÀ1g 1=2 . For spherical domain shapes, effective or volume-averaged domain sizes, which correspond to the inverse of the integral breadths of the sample-related line profile in reciprocal-space units, can be estimated as hDi V ¼ ð3=4Þ exp½ þ ð7=2Þ 2 (Langford et al., 2000). For the strain component of the peak broadening, an isotropic mean microstrain defined by the TOPAS macro e0_from_Strain was used (Coelho, 2018). Additional fitting parameters included background parameters (Chebyshev polynomial), scale parameters, isotropic temperature factors B iso for the TMs, an oxygen positional parameter and the lattice parameters. The results of the Rietveld refinements are displayed in Fig. 11. The refined unitcell parameters for the two samples are 8.18438 (4) and 8.18286 (11) Å for the ball-milled and the additionally calcined powder, respectively. The ball-milled sample contains a relatively high amount [16.1 (2) wt%] of a secondary phase,  which was refined as an ordered Li x (Mn,Ni) 1Àx O rock-salt phase with a cubic Ni 6 MnO 8 structure type (space group Fm " 3 3m) (McCalla & Dahn, 2013). This high amount of impurity phase was probably formed during the extensive ball milling. The high-energy grinding process yields a fine powder with refined arithmetic mean domain sizes of 5 (1) nm for the spinel with a large dispersion (standard deviation) of 7 (2) nm. The left inset of Fig. 11(a) shows the distributions of the domain-size diameters for both phases. The refined value for the mean microstrain is e 0 = 0.0005 (7). The diffraction pattern of the sample calcined at 1083 K for 2 h exhibits narrower peaks [ Fig. 10(b)], but some line broadening compared with the IPF can still be observed. Besides the grain growth and the formation of octahedral crystal shapes of the spinel, the amount of the secondary phase decreased to 7.0 (3) wt% and the rock-salt phase transformed from a cubic Ni 6 MnO 8 structure to a layered rhombohedral phase with space group R " 3 3m. The formation mechanism and crystal structure of the rock-salt phase are very sensitive to the applied temperature and atmospheric conditions (oxygen partial pressure) during synthesis. The WPPM analysis gives a mean octahedron edge size of 184 (30) nm with a dispersion of 16 (12) nm, which is in good agreement with the size distribution visible in the SEM image. The distribution of the octahedron edges is shown in the left inset of Fig. 11(b). The mean microstrain is refined to a low value of e 0 = 0.00018 (1). The observed line broadening of the calcined sample is at the sensitivity limit of the experimental setup and a value of $200 nm represents the upper limit for detectable domain sizes with the high-resolution configuration of the diffractometer.

Conclusions
In this work, we have reported on a multipurpose laboratory X-ray diffractometer for the crystallographic characterization of cathode active battery materials. The flexible design of the diffractometer allows different operation modes with a fast and reliable automated change between different experimental setups. The combination of a high-intensity microfocus rotating-anode X-ray source, 2D parallel-beam multilayer optics and a fast area detector enables the collection of timeresolved powder diffraction data during an operando battery cycling experiment or under non-ambient high-temperature conditions with a reactive gas flow mimicking real synthesis conditions. The collected operando data are of high quality and are suitable for Rietveld refinement so that the progress of electrochemical reactions can be quantitatively monitored, or the evolution of crystallographic parameters under synthetic conditions can be tracked. A high-resolution mode of the diffractometer is enabled by the incorporation of a narrow-bandwidth Ge(111) channel-cut monochromator within the primary-beam path. This reduces the incident-beam intensity significantly but offers a symmetrical narrow instrumental profile component to the observed line profiles. We have shown that this configuration can be used to study the influence of powder processing conditions on the microstructural parameters of a high-voltage spinel CAM by means of X-ray line-profile analysis. With the detailed technical description and the presented scientific examples, we have demonstrated that optimized laboratory PXRD can be successfully employed in operando research. In comparison with synchrotron experiments, with the laboratory machine, time is often less precious and therefore investigations of ageing or degradation are also possible on this instrument. While synchrotron-based operando experiments are far superior with respect to resolution in space, angle and time and therefore can solve very challenging questions, for the moderate time resolutions required for battery research, laboratory-based PXRD can be a sufficiently powerful and adequate tool. PXRD patterns and Rietveld refinement results of (a) the ball-milled and spray-dried LNMFTO spinel and (b) the sample calcined at 1053 K for 2 h, with a square-root scale to emphasize the low-intensity regions. The observed intensity (black crosses), the calculated intensity (red line) and the difference (blue line) are shown. Upper tic marks refer to the spinel phase whereas lower tics correspond to the cubic (a) or layered (b) impurity phase. The left insets show the domain-size distributions with the corresponding mean sizes indicated as vertical lines.